package fy.hr.bean;

import java.lang.reflect.Field;

import fy.util.MyUtil;


public class AwayChangeFromBean {
	
	private String billname;
	
	private String awaytype;

	private String awayaddress;
	
	private String newAwaynote;
	
	private String oldAwaynote;
	
	private String oldAwayid;
	
	private String newAwayid;
	
	private String awaybeginday;
	
	private String awayendday;
	
	private String aheadfee;
	
	private String awaysumhour;
	
	private String formReference;
	
	private long object_id;
	
	private long sender_id;
	
	public void accountAwayDays() {
		this.awaysumhour = String.valueOf(MyUtil.accountDay(this.awaybeginday,
				this.awayendday));
	}
	
	public void printFields() {
		StringBuilder sb = new StringBuilder();

		Field[] fields = this.getClass().getDeclaredFields();

		if (fields != null) {
			try {
				for (int i = 0, length = fields.length; i < length; i++) {
					sb.append(fields[i].getName()).append(":").append(
							fields[i].get(this)).append("\n");
				}
			} catch (Exception e) {
				e.printStackTrace();
			}

		}
		fields = null;
		System.out.println(sb.toString());
	}

	public String getAheadfee() {
		return aheadfee;
	}

	public void setAheadfee(String aheadfee) {
		this.aheadfee = aheadfee;
	}

	public String getAwayaddress() {
		return awayaddress;
	}

	public void setAwayaddress(String awayaddress) {
		this.awayaddress = awayaddress;
	}

	public String getAwaybeginday() {
		return awaybeginday;
	}

	public void setAwaybeginday(String awaybeginday) {
		this.awaybeginday = awaybeginday;
	}

	public String getAwayendday() {
		return awayendday;
	}

	public void setAwayendday(String awayendday) {
		this.awayendday = awayendday;
	}

	public String getAwaysumhour() {
		return awaysumhour;
	}

	public void setAwaysumhour(String awaysumhour) {
		this.awaysumhour = awaysumhour;
	}

	public String getAwaytype() {
		return awaytype;
	}

	public void setAwaytype(String awaytype) {
		this.awaytype = awaytype;
	}

	public String getNewAwayid() {
		return newAwayid;
	}

	public void setNewAwayid(String newAwayid) {
		this.newAwayid = newAwayid;
	}

	public String getOldAwayid() {
		return oldAwayid;
	}

	public void setOldAwayid(String oldAwayid) {
		this.oldAwayid = oldAwayid;
	}

	public String getNewAwaynote() {
		return newAwaynote;
	}

	public void setNewAwaynote(String newAwaynote) {
		this.newAwaynote = newAwaynote;
	}

	public String getOldAwaynote() {
		return oldAwaynote;
	}

	public void setOldAwaynote(String oldAwaynote) {
		this.oldAwaynote = oldAwaynote;
	}

	public String getFormReference() {
		return formReference;
	}

	public void setFormReference(String formReference) {
		this.formReference = formReference;
	}

	public long getObject_id() {
		return object_id;
	}

	public void setObject_id(long object_id) {
		this.object_id = object_id;
	}

	public long getSender_id() {
		return sender_id;
	}

	public void setSender_id(long sender_id) {
		this.sender_id = sender_id;
	}

	public String getBillname() {
		return billname;
	}

	public void setBillname(String billname) {
		this.billname = billname;
	}
}
